﻿// ***********************************************************************
// Assembly         : GooglePredict
// Author           : aj
// Created          : 10-08-2010
//
// Last Modified By : aj
// Last Modified On : 10-08-2010
// Description      : 
//
//
// ***********************************************************************
using Google.API.Predict.Auth;
using Google.API.Predict.Requests.Features;
using Google.API.Predict.Responses;
using Google.API.Predict.Requests.Core;

namespace Google.API.Predict
{
    /// <summary>
    /// Prediction client interface
    /// Wrapper functionality, hides complexities
    /// </summary>
    public interface IGooglePredictionClient
    {
        /// <summary>
        /// Gets the client login.
        /// </summary>
        /// <value>The client login.</value>
        ClientLoginResponse ClientLogin { get; }

        /// <summary>
        /// Gets the bucket.
        /// </summary>
        /// <value>The bucket.</value>
        string Bucket { get; }

        /// <summary>
        /// Gets the data.
        /// </summary>
        /// <value>The data.</value>
        string Data { get; }

        /// <summary>
        /// Requests the specified request.
        /// </summary>
        /// <typeparam name="TResponseType"></typeparam>
        /// <param name="request">The request.</param>
        void Request<TResponseType>(GooglePredictionApiRequest<TResponseType> request) where TResponseType : BaseResponse, new();

        /// <summary>
        /// Checks training on the model
        /// </summary>
        /// <returns></returns>
        MetadataResponse Check();

        /// <summary>
        /// Performs a mixed prediction
        /// </summary>
        /// <param name="value">The Features.</param>
        /// <returns></returns>
        PredictionResponse PredictMixed(MixedFeatures value);

        /// <summary>
        /// Performs a numeric prediction
        /// </summary>
        /// <typeparam name="T">Numeric Type</typeparam>
        /// <param name="value">The Features.</param>
        /// <returns></returns>
        PredictionResponse PredictNumeric<T>(NumericFeatures<T> value);

        /// <summary>
        /// Performs a text prediction
        /// </summary>
        /// <param name="value">The Features.</param>
        /// <returns></returns>
        PredictionResponse PredictText(TextFeatures value);

        /// <summary>
        /// Performs a train request on the current model (bucket/data)
        /// </summary>
        /// <returns></returns>
        TrainingResponse Train();

        /// <summary>
        /// Delets the currently selected model
        /// </summary>
        /// <returns></returns>
        DeleteResponse Delete();
    }
}
